From a0816c2006d246ea55c8e53377d54cecf1089b04 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Fri, 25 May 2018 16:18:45 +0100 Subject: [PATCH] libxl_qmp: Simplify qmp_response_type() prototype MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove the libxl__qmp_handler* argument so the function can be reused later in a different context. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- tools/libxl/libxl_qmp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index c5e05e5679..b2b55b4853 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -273,8 +273,7 @@ static int enable_qmp_capabilities(libxl__qmp_handler *qmp) * Helpers */ -static libxl__qmp_message_type qmp_response_type(libxl__qmp_handler *qmp, - const libxl__json_object *o) +static libxl__qmp_message_type qmp_response_type(const libxl__json_object *o) { libxl__qmp_message_type type; libxl__json_map_node *node = NULL; @@ -340,7 +339,7 @@ static int qmp_handle_response(libxl__gc *gc, libxl__qmp_handler *qmp, { libxl__qmp_message_type type = LIBXL__QMP_MESSAGE_TYPE_INVALID; - type = qmp_response_type(qmp, resp); + type = qmp_response_type(resp); LOGD(DEBUG, qmp->domid, "message type: %s", libxl__qmp_message_type_to_string(type)); switch (type) { -- 2.30.2